package com.atguigu.gmall.user.controller;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.user.UserInfo;
import com.atguigu.gmall.user.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：MJS
 * @date ：Created in 2021/5/20  20:39
 * @description：注册
 */
@RestController
@RequestMapping("/api/user/passport")
public class RegisterApiController {
    @Autowired
    private UserInfoService userInfoService;
    //注册
    @PostMapping("/register")
    public Result register(@RequestBody UserInfo userInfo){
        userInfoService.register(userInfo);
        return Result.ok();
    }

}
